//
//  CodebaseWechatSDK.m
//  CodebaseWechatSDK
//
//  Created by Theo Chen on 2019/5/8.
//

#import "MirrorUMengSDK.h"

@interface MirrorUMengSDK()
  
@end

@implementation MirrorUMengSDK
  
+ (void)initWithAppkey:(NSString *)appKey channel:(NSString *)channel {
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
    [UMConfigure initWithAppkey:appKey channel:channel];
#endif
}
  
  
+ (void)setLogEnabled:(BOOL)bFlag {
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMConfigure setLogEnabled:bFlag];
#endif
}
  
  
+ (void)registerForRemoteNotificationsWithLaunchOptions:(NSDictionary *)launchOptions Entity:(UMessageRegisterEntity *)entity completionHandler:(void (^)(BOOL, NSError * _Nullable))completionHandler {
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage registerForRemoteNotificationsWithLaunchOptions:launchOptions Entity:entity completionHandler:completionHandler];
#endif
}
  
+ (void)registerDeviceToken:(NSData *)deviceToken {
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
    if (deviceToken && deviceToken.length > 0) {
        [UMessage registerDeviceToken:deviceToken];
    }
#endif
}
  
+ (void)didReceiveRemoteNotification:( NSDictionary * __nullable)userInfo {
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage didReceiveRemoteNotification:userInfo];
#endif
}
  
+ (void)setBadgeClear:(BOOL)value{
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage setBadgeClear:value];
#endif
}
  
+ (void)setAutoAlert:(BOOL)value{
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage setAutoAlert:value];
#endif
}
+ (void)sendClickReportForRemoteNotification:(NSDictionary * __nullable)userInfo{
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage sendClickReportForRemoteNotification:userInfo];
#endif
}
  
  
+ (void)getTags:(void (^__nonnull)(NSSet * __nonnull responseTags,NSInteger remain,NSError * __nullable error))handle{
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage getTags:handle];
#endif
}

+ (void)addTags:(__nonnull id)tag response:( void (^ __nonnull)(id __nullable responseObject ,NSInteger remain,NSError * __nullable error))handle{
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage addTags:tag response:handle];
#endif
}

+ (void)deleteTags:(__nonnull id)tag response:(void (^__nonnull)(id __nullable responseObject,NSInteger remain,NSError * __nullable error))handle{
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage deleteTags:tag response:handle];
#endif
}

+ (void)addWeightedTags:(NSDictionary * __nonnull)weightedTag response:(void (^__nonnull)(id __nullable responseObject ,NSInteger remain,NSError * __nullable error))handle{
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage addWeightedTags:weightedTag response:handle];
#endif
}

+ (void)getWeightedTags:(void (^__nonnull)(NSDictionary * __nullable responseWeightedTags,NSInteger remain,NSError * __nullable error))handle{
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage getWeightedTags:handle];
#endif
}

+ (void)deleteWeightedTags:(id __nonnull)weightedTags response:(void (^__nonnull)(id __nullable responseObject,NSInteger remain,NSError * __nullable error))handle{
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage deleteTags:weightedTags response:handle];
#endif
}
+ (void)addAlias:(NSString * __nonnull)name type:(NSString * __nonnull)type response:(void (^__nonnull)(id __nullable responseObject,NSError * __nullable error))handle{
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage addAlias:name type:type response:handle];
#endif
}
+ (void)setAlias:(NSString * __nonnull )name type:(NSString * __nonnull)type response:(void (^__nonnull)(id __nullable responseObject,NSError * __nullable error))handle{
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage setAlias:name type:type response:handle];
#endif
}

+ (void)removeAlias:(NSString * __nonnull)name type:(NSString * __nonnull)type response:(void (^__nonnull)(id __nullable responseObject, NSError * __nullable error))handle{
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage removeAlias:name type:type response:handle];
#endif
}

+(void)addLaunchMessage{
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage addLaunchMessage];
#endif
}

+(void)addCardMessageWithLabel:(NSString* __nonnull)label{
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage addCardMessageWithLabel:label];
#endif
}

+(void)addCustomCardMessageWithPortraitSize:(CGSize )portraitsize LandscapeSize:(CGSize )landscapesize CloseBtn:(UIButton * __nullable )button  Label:(NSString * __nonnull)label umCustomCloseButtonDisplayMode:(BOOL )displaymode{
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage addCustomCardMessageWithPortraitSize:portraitsize LandscapeSize:landscapesize CloseBtn:button Label:label umCustomCloseButtonDisplayMode:displaymode];
#endif
}

+(void)addPlainTextCardMessageWithTitleFont:(UIFont * __nullable)titlefont ContentFont:(UIFont * __nullable)contentfont buttonFont:(UIFont * __nullable)buttonfont Label:(NSString * __nonnull)label{
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage addPlainTextCardMessageWithTitleFont:titlefont ContentFont:contentfont buttonFont:buttonfont Label:label];
#endif
}
  
+(void)openDebugMode:(BOOL)debugmode{
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage openDebugMode:debugmode];
#endif
}
  
+(void)setWebViewClassString:(NSString * __nonnull)webViewClassString{
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMessage setWebViewClassString:webViewClassString];
#endif
}
  
  
+ (void)setUpUMCommonLogManager {
#if TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_SIMULATOR
#else
  [UMCommonLogManager setUpUMCommonLogManager];
#endif
}
  
@end
